<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<% String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/"; %>
<html> 
<jsp:include page="../head.jsp"></jsp:include>
<body>
<jsp:include page="Left.jsp"></jsp:include>
<br/><br/><br/>
<a href='TbUsersServlet?method=showadd'><img src="./images/button-add.gif" border="0"/></a><br/>
<table>
<tr>
    <td>序号</td>
    <td>用户名称</td>
    <td>用户别名</td>
    <td>用户工号</td>
    <td>手机号码</td>
    <td>用户邮箱</td>
    <td>用户类别</td>
    <td>上级领导</td>
    <td>是否有效</td>
    <td>是否是管理员</td>
    <td>登录次数</td>
    <td>最后登录时间</td>
    <td>修改</td>
    <td>删除</td>
</tr>
<c:forEach items="${sessionScope.tbUsersList==null?'':sessionScope.tbUsersList}" var="tbUsers" varStatus="status" >
<tr>
    <td>&nbsp;${status.index+1}</td>
    <td>${tbUsers.userName}</td>
    <td>${tbUsers.userNickName}</td>
    <td>${tbUsers.userWorkId}</td>
    <td>${tbUsers.userPhone}</td>
    <td>${tbUsers.userEmail}</td>
    <td>${tbUsers.userState==0?'超级管理员':tbUsers.userState==1?'管理员':tbUsers.userState==2?'审核人员':tbUsers.userState==3?'普通用户':'无'}</td>
    <td>${tbUsers.tbUserParent.userName}</td>
    <td>${tbUsers.isEnable==0?'有效':'无效'}</td>
    <td>${tbUsers.isAdmin==0?'不是':'是'}</td>
    <td>${tbUsers.userLoginCount}次</td>
    <td>${tbUsers.userLastLoginTime==null?'暂无登录':tbUsers.userLastLoginTime}</td>
    <td><a href='TbUsersServlet?method=listById&userId=${tbUsers.userId}'>修改</a></td>
    <td><a href='javascript:void(0);' onclick='if(confirm("确定要删除?"))window.location="../TbUsersServlet?method=del&delIds=${tbUsers.userId}";'>删除</a></td>
</tr>
</c:forEach>
</table>
<jsp:include page="../foot.jsp"></jsp:include>
</body></html>